package com.ruoyi.login.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.login.api.RemoteLoginService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Author:Jiang
 * @Date: 2023/08/15/ 15:05
 **/
public class RemoteLoginFallbackFactory implements FallbackFactory<RemoteLoginService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteLoginFallbackFactory.class);
    @Override
    public RemoteLoginService create(Throwable cause) {
        log.error("商品服务调用失败:{}", cause.getMessage());
        return new RemoteLoginService(){};
    }
}
